function swipeX(duration, distance) {
  while (duration) {
    swipe(
      device.width / 2,
      device.height / 2,
      device.width / 2,
      device.height / 2 - distance,
      500
    );
    sleep(1 * 1000);
    duration = duration - 1;
  }
}
// swipeX(5, 100);
log(existsText("已完成任务"));
